/**
 *
 * @param path {String}
 */
function myReadFile(path) {
    return new Promise((resolve, reject) => {
        require("fs").readFile(path, (err, data) => {
            if (err) {
                reject(err);
            }
            resolve(data);
        })
    });
}

myReadFile("./resources/content.txt").then(val=>{
    console.log(val.toString());
},err=>{
    console.log(err);
})